﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace METU_CMT.Business
{
    public class ReviewTeam
    {
        private int reviewTeamId;
        private Event @event;
        private Team reviewedTeam;
        private Team reviewerTeam;

        public ReviewTeam(int reviewTeamId)
        {
            ReviewTeamTableAdapter _reviewTeamTableAdapter = new ReviewTeamTableAdapter();
            reviewerTeam = _reviewTeamTableAdapter.GetReviewerTeam(reviewTeamId);
            reviewedTeam = _reviewTeamTableAdapter.GetReviewedTeam(reviewTeamId);
            this.reviewTeamId = reviewTeamId;
            @event = _reviewTeamTableAdapter.GetEvent(reviewTeamId);
        }

        public ReviewTeam()
        {
            //TODO: Not Implemented
        }

        public Event @Event
        {
            get { return @event; }
            set { @event = value; }
        }

        public Team ReviewedTeam
        {
            get { return reviewedTeam; }
            set { reviewedTeam = value; }
        }

        public Team ReviewerTeam
        {
            get { return reviewerTeam; }
            set { reviewerTeam = value; }
        }

        public int ReviewTeamId
        {
            get { return reviewTeamId; }
            set { reviewTeamId = value; }
        }

        public string ReviewedTeamName
        {
            get { return reviewedTeam.TeamName; }
        }

        public string ReviewerTeamName
        {
            get { return reviewerTeam.TeamName; }
        }

        public string Description
        {
            get { return @event.Description; }
        }
    }
}